<div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
  <div class="content"<?php print $content_attributes; ?>>
    <?php
    if (isset($content['field_titre'])) {
      print '<h4>' . $content['field_titre'][0]['#markup'] . '</h4>';
    }
    if (isset($content['field_ressource_externe'])) {
      $object = $content['field_ressource_externe']['#object'];
      $type = $object->field_ressource_type['und'][0]['tid'];
      switch ($type) {
        //image
        case 1:
          $url = $content['field_ressource_externe'][0]['#markup'];
          print '<img src="' . $url . '" alt="image de ' . $content['field_titre'][0]['#markup'] . '" width="530"/>';
          break;
        //son
        case 2:
          $url = $content['field_ressource_externe'][0]['#markup'];
          print '<p class="sound"><a href="'.$url.'">mp3 à écouter plus tard</a></p>';
          break;
        //video
        case 3:
          $chaine = $content['field_ressource_externe'][0]['#markup'];
          print htmlspecialchars_decode($chaine);
          break;
      }
    }
    ?>
  </div>
</div>